package groupe;

import java.util.ArrayList;
import java.util.List;

public class Z6Z extends FiniteGroup implements AbelianGroup {

    public static List<Z6Z> elements;
    private int Val;

    public Z6Z() {

        elements = new ArrayList<Z6Z>(6);
        for (int i = 0 ; i < 6 ; i++) {
            elements.add(new Z6Z(i));
        }
    }

    public Z6Z lci(Z6Z z) {//~ addition modulo 6
//        System.out.println((Val + z.Val) % 6 );
        return new Z6Z((Val + z.Val) % 6 );
    }

    public Z6Z(int i) {
        this.Val = i;
    }

    public int val() {
        return Val;
    }

    @Override
    public String toString() {
        super.toString();
        return String.valueOf(Val);
    }
}
